#include <stdio.h>
#include "SeqQueue.h"
int main()
{
    struct SeqQueue*q = InitQueue(10);
    for(int i = 0; i < 6; i++)
    {
        EnQueue(q, i);// 0 1 2 3 4 5
    }
    QElemType d;

    bool ok = DeQueue(q,&d);
    printf("ok = %d, d = %d\n", ok, d);
    printf("len = %d\n",QueueLength(q));
    //出队
    ok = DeQueue(q,&d);
    printf("ok = %d, d = %d\n", ok, d);
    ok = DeQueue(q,&d);
    printf("ok = %d, d = %d\n", ok, d);
    ok = DeQueue(q,&d);
    printf("ok = %d, d = %d\n", ok, d);


    //入队
    ok = EnQueue(q,6);
    printf("ok = %d\n", ok);
    ok = EnQueue(q,7);
    printf("ok = %d\n", ok);
    ok = EnQueue(q,8);
    printf("ok = %d\n", ok);
    ok = EnQueue(q,9);
    printf("ok = %d\n", ok);
    ok = EnQueue(q,10);
    printf("ok = %d\n", ok);
    ok = EnQueue(q,11);
    printf("ok = %d\n", ok);
    printf("len = %d\n",QueueLength(q));

    ok = GetHead(q, &d);
    printf("GetHead:ok = %d, d = %d\n", ok, d);
    //入队
    for(int i = 0; i < 10; i++)
    {
        ok = EnQueue(q, i);
        printf("for:ok = %d\n", ok);
    }

    while(!QueueIsEmpty(q))
    {
        ok = DeQueue(q,&d);
        printf("while:ok = %d, d = %d\n", ok, d);
    }
    printf("len = %d\n",QueueLength(q));
    DestroyQueue(q);
    q = NULL;

}